package main

import (
	"github.com/cloudwego/hertz/pkg/app/server"
	"github.com/hertz-contrib/cors"
	"hertz/routers"
)

func main() {
	h := server.Default(
		server.WithHostPorts(":8888"),
		server.WithMaxRequestBodySize(100*1024*1024))
	
	routers.SetupRouter(h)

	// 跨域
	h.Use(cors.Default())

	h.Spin()
}
